<?php 
	$host = $_POST["txtHost"];
	$bd = $_POST["txtBD"];
	$pass = $_POST["txtContrasena"];
	$user = $_POST["txtRoot"];
	
	if(!$conexion = mysql_connect($host,$user,$pass)){
		echo "MySQL Error:".mysql_error();
	} 
	if(!mysql_select_db($bd,$conexion)){
		echo "MySQL Error:".mysql_error();
	}
    $sql = explode(";",file_get_contents('./Adiact.sql'));//
    foreach($sql as $query)
    	$insert_query = mysql_query($query,$conexion);
   	$pass_admin = md5($_POST["txtContrasenaA"]);
   	$sql_admin = "INSERT INTO usuarios values('00001','Javier','Hernandez','admin','$pass_admin','','0')";
   	$insert_admin = mysql_query($sql_admin,$conexion);
   	if(!$insert_admin){
   		echo "MySQL Error:".mysql_error();
   	}else{
   		echo "&#161Instalaci&oacute;n Completada&#33";
   	}
    mysql_close($conexion);
?>